package md.lanjing.com.module_home.ui.adapter;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;


import java.util.List;

import md.lanjing.com.module_home.R;
import md.lanjing.com.module_home.bean.HomeRankResponse;


public class HomeRankAdapter extends BaseQuickAdapter<HomeRankResponse.DataBean,BaseViewHolder> {
    public HomeRankAdapter(int layoutResId, @Nullable List<HomeRankResponse.DataBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, HomeRankResponse.DataBean item) {
        helper.setText(R.id.tv_rank,item.getRowNum())
                .setText(R.id.tv_user,item.getPhone().substring(0,3)+"****"+item.getPhone().substring(item.getPhone().length()-4,item.getPhone().length()))
                .setText(R.id.tv_number,item.getCawdNum())
                .setText(R.id.tv_power,item.getTotalIncomeCawd()+"");
    }
}
